<?php
// +----------------------------------------------------------------------
// | Copyright (c) 2020 All rights reserved.
// +----------------------------------------------------------------------
// | User: Simony <1362229026@qq.com>
// | wechat: Shen86579595
// +----------------------------------------------------------------------

namespace app\common\model\evaluate;

use app\common\model\Base;

use think\db;

class EvaluateLog extends Base
{
    protected $name = 'evaluate_log';


    /**
     * User:Simony
     * Function: 是否已评价
     * @param $evaluate_member_id
     * @return bool
     * @throws \think\exception\DbException
     * @throws db\exception\DataNotFoundException
     * @throws db\exception\ModelNotFoundException
     */
    public function isEvaluate($evaluate_member_id,$been_member_id)
    {
        $res = $this->where(['been_member_id'=>$been_member_id])->where("find_in_set({$evaluate_member_id},evaluate_member_ids)")->find();//自己有没有评价

        return $res ? true : false;
    }
}
